<!-- 试用期控件 -->
<template>
  <a-space direction="vertical" style="width: 100%">
    <a-select
      :placeholder="getProps.placeholder"
      allow-search
      allow-clear
      v-model="modelValue"
      :disabled="disabled"
    >
      <a-option
        v-for="item in list"
        :value="item.value"
        :label="item.label"
        :key="item.value"
      ></a-option>
    </a-select>
  </a-space>
</template>

<script lang="ts" setup>
import { GetPositionLevelList } from '@/apis/management/organization/baseSetting';
const props = withDefaults(
  defineProps<{
    props: { [propName: string]: any };
    name?: string;
    required?: boolean;
    oneValue: any;
    disabled?: boolean;
    regex?: {
      [name: string]: {
        role: any;
        name: any;
      };
    };
  }>(),
  {}
);
const emit = defineEmits(['update:oneValue']);
const modelValue = computed({
  get: () => {
    return props.oneValue;
  },
  set: (val) => {
    emit('update:oneValue', val);
  }
});
//复制一份props
const getProps = computed(() => {
  return props.props;
});

let list = ref([
  {
    label: '1个月',
    value: 1
  },
  {
    label: '2个月',
    value: 2
  },
  {
    label: '3个月',
    value: 3
  },
  {
    label: '4个月',
    value: 4
  },
  {
    label: '5个月',
    value: 5
  },
  {
    label: '6个月',
    value: 6
  }
]);
</script>

<style scoped lang="less"></style>
